package com.yty.demo._4_oop;

/**
 * @author: yangtaoyao
 * @time: 2020/1/8 11:05
 * @description: == 与 equals
 */
public class EqualsTest {
    public static void main(String[] args) {
        char c1='A';
        char c2=12;
        System.out.println(65==c1);
        System.out.println(c1==65);
        System.out.println(c2==12);
        System.out.println(c1=='6');

        Children children1=new Children();
        Children children2=new Children();
        System.out.println(children1.equals(children2));
        System.out.println(children1==children2);//false
        System.out.println(children1.age==children2.age);//true

        int i=new Integer("123");
        int i1=Integer.valueOf("123");//本身调用了paseInt()方法
        int i2=Integer.parseInt("123");

        String s1=String.valueOf(2.34f);
        System.out.println(s1);
    }
}
